using System;

namespace TelerikMvcGridCustomBindingHelper.Exceptions
{
    internal class ProjectionsException : Exception
    {
        public ProjectionsException(Type typeIn, Type typeOut)
            : base(CreateExceptionMessage(typeIn, typeOut)) { }

        private static string CreateExceptionMessage(Type typeIn, Type typeOut)
        {
            return string.Format("Unable to create projections for the types \"{0}\" and \"{1}\", try to create a mapping between the properties of these types.", typeIn.FullName, typeOut.FullName);
        }
    }
}